<block name="content">
    <link href="/sap/demo.css" rel="stylesheet" type="text/css" />
    <script src="/sap/scripts/boot.js" type="text/javascript"></script>



    <legend><span></span></legend>
    <div  id='fm1'>
        <div class="fieldset-body">

            <div id="tabs1" class="mini-tabs" activeIndex="0" style="width:100%;margin-top: 5px;overflow:auto;" plain="false"
                 buttons="#tabsButtons"
            >
                <div title="列表：" >

                    <div id="datagrid1" class="mini-datagrid" style="height:430px;width: 100%;"
                         url="/Order/showupdatestockofboc365byexceldetail" idField="id"
                         allowResize="true"
                         allowCellEdit="true" allowCellSelect="true" multiSelect="true"
                         allowCellValid="true" oncellvalidation=""
                    >

                        <div property="columns">

                            <div field="product_id"  headerAlign="center"  >礼品编号
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>

                            <div field="product_name"  headerAlign="center"  >礼品名称
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>

                            <div field="product_spec"  headerAlign="center"  >礼品型号
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>

                            <div field="stock_number"  headerAlign="center"  >当前库存
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>

                            <div field="error_msg"  headerAlign="center"  >失败原因
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>

                            <div field="file_create_time"  headerAlign="center"  >中行文件创建时间
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>
                            <div field="upload_file_name"  headerAlign="center"  >中行文件名
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>

                            <div field="file_update_time"  headerAlign="center"  >中行返回文件更新时间
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>

                            <div field="download_file_name"  headerAlign="center"  >中行返回文件名
                                <input property="" class="mini-textbox" style="width:100%;" />
                            </div>



                        </div>
                    </div>
                </div>
                <!-- <div title="Tab2" iconCls="" >
                    2
                </div> -->
            </div>
        </div>
    </div>


    </body>
    <script type="text/javascript">
        mini.parse();
        var grid = mini.get("datagrid1");
        grid.setPageSize(100);
        grid.load({oaUploadWaveNo:<?php echo $oaUploadWaveNo; ?>});
        grid.on("drawcell", function (e) {
            var record = e.record,
                column = e.column,
                field = e.field,
                value = e.value;

            //格式化日期
            if (field == "file_create_time" || field == "file_update_time") {
                if (mini.isDate(value)) e.cellHtml = mini.formatDate(value, "yyyy-MM-dd HH:mm:ss");

            }

            if (field == "list_tag") {
                e.cellHtml = '<a href="javascript:showList('+value+')"  >' +value+ '</a>';
            }

            if (field == "operate") {
                e.cellHtml = record.list_tag;
            }

        });

        function showList(list_tag) {
            mini.open({
                url:  "/index.php?m=&c=SapSupplier&a=showupdatesapitemlist&list_tag="+list_tag,
                title: "清单细节",
                width: 800,
                height: 380,
                ondestroy: function (action) {
                    if (action == "ok") {

                    }

                }
            });

        }





    </script>
</block>

